<#escape x as x?html>
    <#import "/macros.ftl" as render/>
<head>
    <link href="/css/base.css" type="text/css" rel="stylesheet"/>
    <script type="text/javascript" src="./js/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
    <script type="text/javascript" src=./js/tinymce/tinymce-init.js></script>
    <script src="/js/base.js"></script>
</head>
<body>
    <#if userContext.loggedIn>
    <a href="/logout">(Logout)</a>

    <h2>Welcome Home, ${userContext.username}!</h2>

    <p>According to our calculations, in this session you have visited this page
    ${userContext.getHitsPerPage('/home')} times now.</p>

    <p></p>

    <@render.renderJournalFamilies journalFamilies origin/>
    <@render.renderCreateJournalFamilyForm/>

        <#else>

        <h2>Welcome Unknown User!</h2>

        <p>There's not much to see here since you aren't logged in, so why don't you run along and
            <a href="/login">do that now</a>.</p>

        <p>Or, if you haven't yet, <a href="/register">register now</a>.</p>
    </#if>

</body>
</#escape>